import React, { Component } from 'react'
import DatePicker from 'react-native-datepicker'
import { View } from  'react-native'
import  Button from './Button'
// import  DatePicker from './DatePickerView.ios'
import  DatePickerPopView from './DatePickerPopView.ios'

 
export default class MyDatePicker extends Component {
  constructor(props){
    super(props)
    this.state = {date:"2016-05-15"}
    console.log(this.state.date)
  }
 
  render(){
    return (
        <View>
      <Button title= "pickMyTime" onPress={()=> DatePicker.onPressDate} style={{width: 75,
          height:30,
          color:'black',
          textAlign: 'center'}}/>

            <DatePicker
    style={{width: 200, marginTop: 100, height: 200}}
    date={this.state.date}
    mode="date"
    // height={ 250 }
    showIcon = { false }
    // placeholder="select date"
    // format="YYYY-MM-DD"
    // minDate="2016-05-01"
    // maxDate="2016-06-01"
    //  confirmBtnText="Confirm"
    //  cancelBtnText="Cancel"
     //customStyles={{
    //     dateIcon: {
    //         position: 'absolute',
    //         left: 0,
    //         top: 4,
    //         marginLeft: 0
    //     },
    //     dateInput: {
    //         marginLeft: 36
    //     }
    //     // ... You can check the source to find the other keys.
    // }}
    // onDateChange={(date) => {
    //     this.setState({date: date})
    // }}
    ></DatePicker>
        </View>
    )
  }
}